package com.woniu.HisHospitalizationApiImpl;

import com.woniu.HisHospitalizationApi.HisNursingApi;
import com.woniu.dto.HisNursingDto;
import com.woniu.dto.PageDTO;
import com.woniu.exception.DIYException;
import com.woniu.mapper.HisNursingMapper;
import com.woniu.model.HisNursing;
import com.woniu.param.HisNursingAddParam;
import com.woniu.param.HisNursingParam;
import com.woniu.service.IHisNursingService;
import com.woniu.util.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;

@RestController
@Slf4j
public class HisNursingApiImpl implements HisNursingApi {
    @Resource
    private HisNursingMapper hisNursingMapper;
    @Resource
    private IHisNursingService hisNursingService;

    @Override
    public Result<PageDTO<HisNursingDto>> getAllHisNursing() {
        return null;
    }

    @Override
    public Result<HisNursingDto> addHisNursing(HisNursingAddParam hisNursingAddParam) {
        return hisNursingService.addHisNursing(hisNursingAddParam);
    }

    @Override
    public Result<Boolean> deleteHisNursingById(ArrayList<Integer> id) {

        return hisNursingService.deleteHisNursingById(id);
    }

    @Override
    public Result<HisNursingDto> updateHisNursing(HisNursingParam hisNursingParan) {
        return hisNursingService.updateHisNursing(hisNursingParan);
    }

    @Override
    public Result<PageDTO<HisNursingDto>> getHisNursingBy(HisNursingParam hisNursingParam) {
        return hisNursingService.getHisNursingBy(hisNursingParam);
    }
}
